package com.example.dao;

import com.example.entity.GoumaiordersInfo;
import com.example.entity.SigninusersInfo;
import com.example.vo.GoumaiordersInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface GoumaiordersInfoDao extends Mapper<GoumaiordersInfo> {
    List<GoumaiordersInfoVo> findByGoodsnumbers(@Param("goodsnumbers") String goodsnumbers);
	List<GoumaiordersInfoVo> findByGoodsnumberslist2(@Param("goodsnumbers") String goodsnumbers,@Param("username") String username);
        
	//xiugaimimazy
    int checkRepeat(@Param("column") String column, @Param("value") String value, @Param("id") Long id);
    
    Integer count();
	
	@Select("select * from goumaiorders_info where username = #{username}")
    GoumaiordersInfo selectByUsername(String username);
	
	@Select("SELECT * FROM goumaiorders_info order by id")
    List<Map<String, Object>> daochuexcel();
	
	@Select("SELECT xxdiquziduanxxxx,count(id) as hsggs FROM goumaiorders_info  group by xxdiquziduanxxxx")
    List<Map<String,String>> findByDiqu();
	
	
	
	@Select("SELECT distinct(goodsnamec) as aa,count(id) as bb FROM goumaiorders_info group by goodsnamec order by id")
List<Map<String, Object>> goumaiorders_tj_goodsnamec();
@Select("SELECT distinct(types) as aa,count(id) as bb FROM goumaiorders_info group by types order by id")
List<Map<String, Object>> goumaiorders_tj_types();

	
	
    
	
	
	
	//wexixinxzhuaxnyoxng
	
	@Select("select * from goumaiorders_info where username = #{username}")
    List<GoumaiordersInfo> findByusername(SigninusersInfo signinusersInfo);
    

}
